<h1>Editing gift</h1>
<%= link_to 'Destroy', { :action => 'destroy', :id => @gift }, :confirm => 'Are you sure you want to delete this gift?', :method => :post %>

<% form_tag ({:action => 'update', :id => @gift}, :multipart => true) do %>
  <%= render :partial => 'form' %>

	<p><label for="gift_picture">Picture</label><br/>
		<% unless @gift.picture.blank? %>
		<%= image_tag (url_for({:action => 'image', :id => @gift.id})) -%><br /><br />
		<% end %>
		
		Change Photo<br />
		<%= file_field 'gift', 'pictureimg'  %></p>
		
  <%= submit_tag 'Edit' %>
<% end %>

<%= link_to 'Show', :action => 'show', :id => @gift %> |
<%= link_to 'Back', :action => 'list' %>
